<?
require('./application/views/header.php');

?>


		
    	<div id="content">
        
            	<h2>Zoekertjes overzicht</h2>
                
                
                   <? if($this -> exists('prevPage') || $this -> exists('nextPage')){ ?>   
				 <ul class="page_menu">
            <? if($this -> exists('prevPage')){ ?>
            <li><a href="/zoekertjes/<?=$this -> prevPage?>/" class="backBtn">Vorige</a></li>
            <? }
				if($this -> exists('nextPage')){
			 ?>
            <li><a href="/zoekertjes/<?=$this -> nextPage?>/" class="forBtn">Volgende</a></li>
            <?
			}
			?>
            </ul>
				
				
				<? } ?>
  		<table class="inabuurt" cellpadding="0" cellspacing="0">
       
            	<tr>
                	
                    <th>Titel</th>
                    <th>Autheur</th>
                    <th>Tijdstip</th>
                    <th>Type</th>
                </tr>
                <? foreach ($this -> zoekertjes as $value)
					{ 
						switch($value -> zoeker_type)
						{
							case 0:
								$name = 'aanvraag';
								$link = 'aanvragen';
								break;
							case 1:
								$name = 'aanbieding';
								$link = 'aanbiedingen';
								break;
						}
												
									
									
									
									?>
				<tr>
                	
                    <td><a href="<?= '/bewonersgroepen'.'/'.view::encodeForUrl($value -> geb_naam).'/zoekertjes/'.$link.'/'.view::encodeForUrl($value -> title).'/'.$value -> id.'/' ?>"><?= $value ->  title ?></a></td>
                    <td><?= $value -> geb_naam?></td>
                    <td><?= $value -> datum ?></td>
                    <td><?= $name ?></td>
                </tr>
               <? } ?>
            </table>          	
                     <? if($this -> exists('prevPage') || $this -> exists('nextPage')){ ?>   
				 <ul class="page_menu">
            <? if($this -> exists('prevPage')){ ?>
            <li><a href="/zoekertjes/<?=$this -> prevPage?>/" class="backBtn">Vorige</a></li>
            <? }
				if($this -> exists('nextPage')){
			 ?>
            <li><a href="/zoekertjes/<?=$this -> nextPage?>/" class="forBtn">Volgende</a></li>
            <?
			}
			?>
            </ul>
				
				
				<? } ?>
                    
  </div>
<? include('footer.php'); ?>